/*
 * localStorage
 */
const TokenKey = 'takeout_admin_token'

export const getToken = () => localStorage.getItem(TokenKey)

export const setToken = token => localStorage.setItem(TokenKey, token)

export const removeToken = () => localStorage.removeItem(TokenKey)

const UserId = 'user_id'

export const getUserId = () => localStorage.getItem(UserId)

export const setUserId = id => localStorage.setItem(UserId, id)

export const removeUserId = () => localStorage.removeItem(UserId)

/*
  * cookie
 import Cookies from 'js-cookie'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
 */
